package com.ruoyi.web.controller.config;

import java.io.FileWriter;
import java.io.IOException;

/**
 * @author liwenjing
 * @date 2021/5/10
 */

public class AlipayConfig {
    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000117644637";
    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCg9WEXU7SBjAjm8ZR8yF9whdbKe1SrEOzXJuZIPqbBQG0RpTGB06Wdp2JmxJXqveqCRrLe74w6mHXy88osj1u7asMt/8Ez1UdevVlXkJShKNwpEjNaKWtBCgXwqNzs/XTWCj1UMLhR5R7LAidCG7c+u0Kg9UvTYxatjUuJ0HeaUn58tv+dXfra9NrWpve4O9GGedMHp+ZS4M1CTLaJcU4DErrRcFD4bEW5JqU0ZDG6kPYnpFsx78yAmyJ+8yjwz/6PL5+t9VzHSafIXM5fCzOU7Q3YsIDIgAHpObLb4CJzHvZq9j/x1I0RfepuIV46mIZouvjVp8H2A3s+H0zkLPtpAgMBAAECggEAG5195u6pjYBlFppkC3SlSzzrORon0KG6wL8fy01UdtuC2wAomkmhpIbPTypzPi8PSQKwNaeLu5HkyqYhDbwa1PDgQ8gZcbcp44tBBND9bxj/jNxeix2IFUSO+FdAcDicDwz6sLMbLJHO0q2v5puyuMSQDeWH+OCLR4Nyblah7ovqgxhVj3vRARD4pT6GSs4AwhdBKDiwA4uEO5+3sD2EJcp+8hE/I9XFip2tVG4Uuya8N8ACH7MtV2zpJD/SJB07oMz5fkIKlvE5l0S9Uu7UB/hDaOvPP+hfdM36oDgkHFMZyFlDVvbKg54SuPb5weX5/DQSrgZ01HTFQUnPRnB8AQKBgQDm/PdN7CkXGv3kFFFaEb1i7Geolx9Ud2HZ/dG/+mWTQcvOcy2Q0SesyB9FyO5XpzzM2Ic87mYilPte14WirXaZkOBOSjWEAEDSDh4ovbguF+Ggqw3xxZ1jMH6se5CO1rfPt0QlyG3ibGnnGGHi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JycX74MmgidjRMaoChcpL1nM6zX+6lqDxOpMh7tb1+SZa70jR5zs8uhUGSKscrd3kgzxAoGAYG8sOQ+kUzNwx/+7ZL6b7LRqRhAaQl8TmD9oL7l5xlXuhjxEsk6OeN5olUxnEABgnckHyHAMlB40DLcWhgVDJBCNLXoGnygR0upEpBK2sq3WFy1MoPouBwxsU1/WVO/RRTpCp8aYrlfxWr0/DLmzzPTZe+5ZIfe7sKRKMxYqx38=";
    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key ="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIgHnOn7LLILlKETd6BFRJ0GqgS2Y3mn1wMQmyh9zEyWlz5p1zrahRahbXAfCfSqshSNfqOmAQzSHRVjCqjsAw1jyqrXaPdKBmr90DIpIxmIyKXv4GGAkPyJ/6FTFY99uhpiq0qadD/uSzQsefWo0aTvP/65zi3eof7TcZ32oWpwIDAQAB";
    //public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDIgHnOn7LLILlKETd6BFRJ0GqgS2Y3mn1wMQmyh9zEyWlz5p1zrahRahbXAfCfSqshSNfqOmAQzSHRVjCqjsAw1jyqrXaPdKBmr90DIpIxmIyKXv4GGAkPyJ/6FTFY99uhpiq0qadD/uSzQsefWo0aTvP/65zi3eof7TcZ32oWpwIDAQAB";
    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String  return_url= "http://localhost:81/business/orderDetail/index";
    //public static String notify_url = "http://www.baidu.com";
    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://upe27w.natappfree.cc/system/pay/returnUrl";
    //public static String return_url = "http://www.baidu.com";
    // 签名方式
    public static String sign_type = "RSA2";
    // 字符编码格式
    public static String charset = "utf-8";
    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
    // 支付宝网关
    public static String log_path = "D:\\";

//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}